package cn.com.cifi.mars.util.json;

public class JsonRespResult<T> {

	private int code;
	private String msg;
	private T data;

	public String getMsg() {
		return this.msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getCode() {
		return this.code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public T getData() {
		return (T) this.data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public JsonRespResult() {
	}

	public JsonRespResult(int code) {
		this.code = code;
	}

	public JsonRespResult(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public JsonRespResult(int code, String msg, T data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	public String toString() {
		String result = "";
		if (this != null) {
			result = JsonUtils.convertObjectToJson(this);
		}
		return result;
	}
}
